import 'package:practice/data/entity/user_info_entity.dart';

userInfoEntityFromJson(UserInfoEntity data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id'].toString();
	}
	if (json['userId'] != null) {
		data.userId = json['userId'].toString();
	}
	if (json['realName'] != null) {
		data.realName = json['realName'].toString();
	}
	if (json['userName'] != null) {
		data.userName = json['userName'].toString();
	}
	if (json['password'] != null) {
		data.password = json['password'].toString();
	}
	if (json['email'] != null) {
		data.email = json['email'].toString();
	}
	if (json['phone'] != null) {
		data.phone = json['phone'].toString();
	}
	if (json['wechatId'] != null) {
		data.wechatId = json['wechatId'].toString();
	}
	if (json['avatar'] != null) {
		data.avatar = json['avatar'].toString();
	}
	if (json['pushId'] != null) {
		data.pushId = json['pushId'].toString();
	}
	if (json['description'] != null) {
		data.description = json['description'].toString();
	}
	if (json['clientId'] != null) {
		data.clientId = json['clientId'].toString();
	}
	return data;
}

Map<String, dynamic> userInfoEntityToJson(UserInfoEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['userId'] = entity.userId;
	data['realName'] = entity.realName;
	data['userName'] = entity.userName;
	data['password'] = entity.password;
	data['email'] = entity.email;
	data['phone'] = entity.phone;
	data['wechatId'] = entity.wechatId;
	data['avatar'] = entity.avatar;
	data['pushId'] = entity.pushId;
	data['description'] = entity.description;
	data['clientId'] = entity.clientId;
	return data;
}